#include "D3DStdfx.h"
#include "D3DApp.h"

///////////////////////////////////////////////////////////////////////////////////////////////////


CD3DApp::CD3DApp( bool bWindowed, UINT nWidth, UINT nHeight ) {

    m_EngineState = &GetD3DEngineState() ;

    if( bWindowed ) {
        m_EngineState->SetWindowed( TRUE ) ;
        m_EngineState->SetWindowedBackBufferWidth( nWidth ) ;
        m_EngineState->SetWindowedBackBufferHeight( nHeight ) ;
    }
    else {
        m_EngineState->SetWindowed( FALSE ) ;
        m_EngineState->SetFullScreenBackBufferWidth( nWidth ) ;
        m_EngineState->SetFullScreenBackBufferHeight( nHeight ) ;
    }

}


///////////////////////////////////////////////////////////////////////////////////////////////////


void    CD3DApp::OnLostDevice( void *pUserContext )      { xMsg( OnLostDevice() ) } ;
